
import './index.css'
import {Tabs} from 'antd-mobile'
import {useTabs} from './usetabs'
import HomeList from './HomeList'

const Home =()=>{
    //组件中进行结构状态数据或方法
   const {channels} =  useTabs()

    return (
        <div>
            <div className='tabContainer'>
                  
                 <Tabs defaultActiveKey={'0'}>
                    渲染评到列表
                    {channels.map(item=>(
                        <Tabs.Tab title={item.name} key={item.id}>

                            {/* 评到列表 */}
                            {/*别忘嘞加上类名严格控制滚动盒子*/}
                            <div className='listContainer'>
                                <HomeList channelId ={''+ item.id}  ></HomeList>
                             </div>
                        </Tabs.Tab>
                    ))}
                </Tabs>        
            </div>
           

        </div>
    )
}
export default Home